package com.xzr.demo.mqclient;

import lombok.Data;

import java.io.IOException;

/**
 * @Author：徐志荣
 * @Date：2023/8/18 上午 11:25
 */
@Data
public class ConnectionFactory {
    //broker server 的ip地址
    private String host;
    //broker server的 端口号
    private int port;

    //访问哪个虚拟主机呢？
   /* private String VirtualHostName;
    private String username;
    private String password;*/

    //创建连接
    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host, port);
        return connection;
    }

}
